home *** CD-ROM | disk | FTP | other *** search
- --- VCOMMANDS ---
- --- Written by Yogesh Raja 1989 ---
-
- There are 8 programs on this disk, all starting with the letter V to make
- them distinguishable. They all allow string handling and manipulation
- within AmigaDOS.
- As you may know, the only command that allows input on a normal disk is
- the ASK command. However, it only allows the input of two letters, Y or N.
- The programs here will allow input and processing of a string of characters
- to a maximum of 80 characters. There are 26 possible variables each being
- able to hold 80 characters. The variables are labelled A-Z.
- The commands are:-
-
- VInput
- VLet
- VPrint
- VCls
- VCompare
- VQuickCmp
- VUpper
- VClear
-
- VInput gives a prompt for input, rather than immediately transferring a
- string specified from CLI. You may, if you wish, specify a string for the
- program to display before awaiting input. The string should be enclosed in
- quotes. For example:- 'VInput "What is your name",a' will display the
- following:
-
- What is your name?
- *input is accepted here*
-
- You can, instead of a comma, put a '|' character (found on the key to the
- left of BACKSPACE). This will await input on the same line as the specified
- string. For example, 'VInput "Name >"|a' will display the following:
-
- Name >*input is accepted here*
-
- Specifying just a variable, eg 'VInput j' will display a greater-than sign
- and wait for the input, which will be put into the specified variable (in
- the example's case, variable J.) Eg, '> *input here*'
-
- VLet is simple - it just puts a CLI specified string into a specified
- variable. It will also transfer variable to variable. For instance:
- 'VLet "Motorola",q' will put the string 'Motorola' into variable Q.
- Similarly, 'VLet q,a' will copy the string in variable Q into variable A.
-
- VPrint will allow you to display a combination of CLI specified strings
- and strings in specified variables, for instance: If variable A contains the
- string 'ST Amiga Format', the command 'VPrint "I buy "a" every month!" will
- display:
-
- I buy ST Amiga Format every month!
-
- Straight after closing quotes the variable may be specified without any
- other characters. However, if a comma is specified after a string OR a
- variable, effectively anywhere in the command, a carriage return will be
- executed at that point before any further printing. For instance, in the
- above example's case, the command 'VPrint "Variable A contains",a"!"' will
- do the following:
-
- Variable A contains
- ST Amiga Format!
-
- VCls simply clears the CLI screen and returns the prompt to the top. This
- command might be handy if the screen looks cluttered up and causes
- confusion.
-
- VCompare allows comparison of a CLI specified string and a variable or
- two variables. The IF command already on all Workbench disks can be used
- with this command just as it is used with the ASK command. If a comparison
- with VCompare is affirmative, the case for IF WARN will be true, otherwise
- the case for IF NOT WARN will be true.
- Examples:-
- 'VCompare "HELLO",a' will compare the string 'HELLO' with the string in
- variable A.
- 'VCompare a,b' will compare the string in variable A with the string in
- variable B.
-
- VQuickCmp is the same as VCompare, except it is used within CLI and not a
- command file like VCompare. It is helpful if you want to see whether two
- variables are the same instead of VPrinting the two variables and comparing
- by eye. The program will respond with a "Text same" or "Text not the same"
- message.
-
- VUpper will convert the string in a specified variable to upper-case. If
- variable P contains the string "arTifiCIal intelligence", 'VUpper P' will
- change the string to "ARTIFICIAL INTELLIGENCE".
-
- VClear will clear all data in all variables and deallocate the 2.03K used
- for string storage back to the system.
-
- You can type a question mark after any of the VCommands if you want a
- quick reference to the syntax for that command (except for VClear and VCls
- as they do not require parameters.)
-
- Finally, well done to HiSoft for creating something extremely valuable to
- me - Devpac Amiga Version 2. Superb piece of programming.
-